package org.jie.guider.java.base.threadpool;

import java.util.Map;

/**
 * @author LiJie
 */
public class ThreadTest {

    public static void main(String[] args) {
        Map<Thread, StackTraceElement[]> stackTraces = Thread.getAllStackTraces();

        for (Map.Entry<Thread, StackTraceElement[]> tmp : stackTraces.entrySet()) {
            System.out.println(tmp.getKey().getName() + "-" + tmp.getKey().getId() + " : " + tmp.getKey().getState());
            System.out.println(tmp.getKey().getThreadGroup().getName());
            System.out.println(tmp.getKey().getContextClassLoader());
            System.out.println("-----------------");
        }
    }
}
